package com.sais.manage.boot.cms.dto;


import com.sais.manage.boot.cms.entity.Article;
import com.sais.common.dto.BaseDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

/**
 * 文章 保存 DTO
 *
 * @author zwp
 * @date 2020/02/16
 **/
@Data
@Accessors(chain = true)
@NoArgsConstructor
public class ArticleSaveDTO extends BaseDTO {

    private String ukId;
    private String userId;
    private String categoryId;
    private String title;
    private Integer status;
    private Integer type;

    private String content;

    public Article convert(ArticleSaveDTO articleSaveDTO) {
        Article article = new Article();
        BeanUtils.copyProperties(this, article);
        return article;
    }
}
